<template>
    <div>
        <el-container>
            <el-header style="background-color: rgb(255, 255, 255) ;height: 20%;">
                <el-descriptions class="margin-top"  title="用户信息" :column= "3">
                    <template slot="extra">
                        <el-button type="primary" size="small">操作</el-button>
                    </template>
                    <el-descriptions-item>
                        <template slot="label">
                        用户ID
                        </template>
                        {{user.userID}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                        用户公钥
                        </template>
                        {{user.userPk}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                        用户唯一身份标识
                        </template>
                        {{user.GID}}
                    </el-descriptions-item>
                    <el-descriptions-item>
                        <template slot="label">
                        跨域认证密钥
                        </template>
                        {{user.authSk}}
                    </el-descriptions-item>
                    <!-- <el-descriptions-item>
                        <template slot="label">
                        备注
                        </template>
                        <el-tag size="small">已认证</el-tag>
                    </el-descriptions-item> -->
                    <el-descriptions-item>
                        <template slot="label">
                        域信息
                        </template>
                        {{user.domainID}}
                    </el-descriptions-item>
                </el-descriptions>
            </el-header>

            <el-main>
                <el-table 
                    :data="tableData"
                    border
                    style="width: 100%">
                    <el-table-column
                    fixed
                    prop="date"
                    label="日期"
                    width="150">
                    </el-table-column>
                    <el-table-column
                    prop="dataID"
                    label="域内资源标识"
                    width="120">
                    </el-table-column>

                    <el-table-column
                    prop="domainID"
                    label="数据域"
                    width="120">
                    </el-table-column>

                    <el-table-column
                    prop="userID"
                    label="数据来源"
                    width="120">
                    </el-table-column>

                    <el-table-column
                    prop="NI"
                    label="唯一资源标识符"
                    width="300">
                    </el-table-column>


                    <!-- <el-table-column
                    prop="zip"
                    label="邮编"
                    width="120">
                    </el-table-column> -->
                    <el-table-column
                    fixed="right"
                    label="操作"
                    width="100">
                    <template slot-scope="scope">
                        <el-button @click="deleteDate(scope.row)" type="text" size="small">删除</el-button>
                        <el-button @click="openDate(scope.row)" type="text" size="small">公开</el-button>
                    </template>
                    </el-table-column>
                </el-table>
            </el-main>
        </el-container>
    </div>
  </template>
  
  <script>
  export default {
    methods: {
      deleteDate(row) {
        console.log(row);
      },
      openDate(row) {
        console.log(row);
      }
    },

    data() {
      return {
        user: {
          userID: '0x3423',
          userPk: '0x23343423',
          GID: '0X321312',
          authSk: '0x2332',
          domainID: 'A',
          
        },
        tableData: [{
          date: '2016-05-02',
          dataID: '0X32343243',
          domainID: 'A',
          userID: '0x231a321b',
          NI: '0x4324234',
        },{
          date: '2016-05-03',
          dataID: '0X32343243',
          domainID: 'A',
          userID: '0x231a321b',
          NI: '',
        }],
      }
      
    }
  }
</script>